package com.me.exam.service;

import com.me.exam.model.Stu;
import com.me.exam.repository.StuRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StuService {
	@Autowired
	private StuRepository stuRepository;
	
	
	public List<Stu> findAll() {
		return stuRepository.findAll();
	}
	
	public Stu save(Stu stu) {
		return stuRepository.saveAndFlush(stu);
	}
}
